home *** CD-ROM | disk | FTP | other *** search
/ SGI Developer Toolbox 6.1 / SGI Developer Toolbox 6.1 - Disc 4.iso / src / apps / pcnfsd / install / addpcnfs.sh next >
Encoding:
Linux/UNIX/POSIX Shell Script  |  1994-08-02  |  2.8 KB  |  96 lines

  1. #! /bin/sh 
  2. #############################################################################
  3. #
  4. # This shell script installs the PC-NFS daemon for you
  5. #    rcb/SGI        09 JUN 94
  6. #
  7. #############################################################################
  8. #
  9. #############################################################################
  10. #
  11. #    Copy the Daemon to network directory
  12. #
  13. #############################################################################
  14. if [ -s /usr/etc/pcnfsd ]
  15.     then
  16.         /sbin/echo ""
  17.         /sbin/echo "/usr/etc/pcnfsd already exists, it will be terminated."
  18.         /sbin/echo ""
  19.         /sbin/killall pcnfsd
  20. fi
  21. /bin/cp pcnfsd /usr/etc/pcnfsd
  22. /sbin/echo "pcnfsd file copied."
  23. #############################################################################
  24. #
  25. #    Create PC-NFS config file, if needed
  26. #
  27. #############################################################################
  28. if [ -s /etc/pcnfsd.conf ]
  29.     then
  30.         /sbin/echo ""
  31.         /sbin/echo "There is already a PC-NFS configuration file."
  32.         /sbin/echo ""
  33.     else
  34.         umask 0
  35.         /bin/cp pcnfsd.conf /etc
  36.         /sbin/echo "pcnfsd configuration file copied"
  37. fi
  38. #############################################################################
  39. #
  40. #    Create PC-NFS print spool directory, if needed
  41. #
  42. #############################################################################
  43. if [ -d /var/spool/pcnfs ]
  44.     then
  45.         /sbin/echo ""
  46.         /sbin/echo "There is already a PC-NFS print spool directory."
  47.         /sbin/echo ""
  48.     else
  49.         umask 0
  50.         /bin/mkdir /var/spool/pcnfs
  51.         /bin/chmod +rwx /var/spool/pcnfs
  52.         /sbin/echo "pcnfsd spool directory created"
  53. fi
  54. /sbin/echo ""
  55. /sbin/echo "Make sure you export the PC-NFS print spool directory"
  56. /sbin/echo "    /var/spool/pcnfs"
  57. /sbin/echo "with no access restrictions to allow print spooling."
  58. /sbin/echo "see: man exportfs"
  59. /sbin/echo ""
  60. #############################################################################
  61. #
  62. #    Install the man-page
  63. #
  64. #############################################################################
  65. if [ -d /usr/catman/local/man8 ]
  66.     then
  67.         /sbin/echo ""
  68.         /sbin/echo "There is already a section 8 man-page directory."
  69.         /sbin/echo ""
  70.     else
  71.         umask 0
  72.         /bin/mkdir /usr/catman/local/man8
  73.         /sbin/echo "Section 8 man-page directory created"
  74. fi
  75. /bin/cp pcnfsd.8c /usr/catman/local/man8
  76. /sbin/echo "PC-NFS daemon manual page(s) installed."
  77. /sbin/echo ""
  78. #############################################################################
  79. #
  80. #    Create /etc/config/pcnfsd
  81. #
  82. #############################################################################
  83. if /etc/chkconfig pcnfsd ; then
  84.     /sbin/echo "PC-NFS daemon is already configured in chkconfig"
  85. else
  86.     /etc/chkconfig -f pcnfsd on
  87. fi
  88. /usr/etc/pcnfsd &
  89. /sbin/echo "pcnfsd service started"
  90. #############################################################################
  91. #
  92. #    All done.
  93. #
  94. #############################################################################
  95. /sbin/echo "PC-NFS daemon installation successful."
  96.